home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13496 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 6e 65 77 73 67 61 74 65 | 2e 6d 65 6c 70 61 72 2e |newsgate|.melpar.|
|00000030| 65 73 79 73 2e 63 6f 6d | 21 6e 65 77 73 0a 46 72 |esys.com|!news.Fr|
|00000040| 6f 6d 3a 20 46 72 65 64 | 20 4c 61 42 61 72 20 3c |om: Fred| LaBar <|
|00000050| 66 6c 61 62 61 72 40 6d | 65 6c 70 61 72 2e 65 73 |flabar@m|elpar.es|
|00000060| 79 73 2e 63 6f 6d 3e 0a | 53 75 62 6a 65 63 74 3a |ys.com>.|Subject:|
|00000070| 20 52 65 3a 20 48 45 4c | 50 20 32 64 20 64 79 6e | Re: HEL|P 2d dyn|
|00000080| 61 6d 69 63 61 6c 6c 79 | 20 61 6c 6c 6f 63 61 74 |amically| allocat|
|00000090| 65 64 20 61 72 72 61 79 | 0a 58 2d 4d 61 69 6c 65 |ed array|.X-Maile|
|000000a0| 72 3a 20 4d 6f 7a 69 6c | 6c 61 20 32 2e 30 20 28 |r: Mozil|la 2.0 (|
|000000b0| 58 31 31 3b 20 49 3b 20 | 49 52 49 58 20 35 2e 33 |X11; I; |IRIX 5.3|
|000000c0| 20 49 50 31 39 29 0a 43 | 6f 6e 74 65 6e 74 2d 54 | IP19).C|ontent-T|
|000000d0| 79 70 65 3a 20 74 65 78 | 74 2f 70 6c 61 69 6e 3b |ype: tex|t/plain;|
|000000e0| 20 63 68 61 72 73 65 74 | 3d 75 73 2d 61 73 63 69 | charset|=us-asci|
|000000f0| 69 0a 52 65 66 65 72 65 | 6e 63 65 73 3a 20 3c 34 |i.Refere|nces: <4|
|00000100| 69 68 6b 61 65 24 38 6e | 74 40 74 61 63 6f 2e 63 |ihkae$8n|t@taco.c|
|00000110| 63 2e 6e 63 73 75 2e 65 | 64 75 3e 0a 53 65 6e 64 |c.ncsu.e|du>.Send|
|00000120| 65 72 3a 20 6e 65 77 73 | 40 6d 65 6c 70 61 72 2e |er: news|@melpar.|
|00000130| 65 73 79 73 2e 63 6f 6d | 20 28 4d 65 6c 70 61 72 |esys.com| (Melpar|
|00000140| 20 4e 65 77 73 20 41 64 | 6d 69 6e 69 73 74 72 61 | News Ad|ministra|
|00000150| 74 6f 72 29 0a 4d 69 6d | 65 2d 56 65 72 73 69 6f |tor).Mim|e-Versio|
|00000160| 6e 3a 20 31 2e 30 0a 4f | 72 67 61 6e 69 7a 61 74 |n: 1.0.O|rganizat|
|00000170| 69 6f 6e 3a 20 45 2d 53 | 79 73 74 65 6d 73 2c 20 |ion: E-S|ystems, |
|00000180| 4d 65 6c 70 61 72 20 44 | 69 76 0a 44 61 74 65 3a |Melpar D|iv.Date:|
|00000190| 20 54 75 65 2c 20 32 36 | 20 4d 61 72 20 31 39 39 | Tue, 26| Mar 199|
|000001a0| 36 20 31 33 3a 30 39 3a | 35 32 20 47 4d 54 0a 54 |6 13:09:|52 GMT.T|
|000001b0| 6f 3a 20 52 6f 62 65 72 | 74 20 42 61 72 63 6c 61 |o: Rober|t Barcla|
|000001c0| 79 20 53 74 65 76 65 6e | 73 6f 6e 20 3c 72 62 73 |y Steven|son <rbs|
|000001d0| 74 65 76 65 6e 40 65 6f | 73 2e 6e 63 73 75 2e 65 |teven@eo|s.ncsu.e|
|000001e0| 64 75 3e 0a 4d 65 73 73 | 61 67 65 2d 49 44 3a 20 |du>.Mess|age-ID: |
|000001f0| 3c 33 31 35 37 45 43 41 | 30 2e 34 31 43 36 40 6d |<3157ECA|0.41C6@m|
|00000200| 65 6c 70 61 72 2e 65 73 | 79 73 2e 63 6f 6d 3e 0a |elpar.es|ys.com>.|
|00000210| 43 6f 6e 74 65 6e 74 2d | 54 72 61 6e 73 66 65 72 |Content-|Transfer|
|00000220| 2d 45 6e 63 6f 64 69 6e | 67 3a 20 37 62 69 74 0a |-Encodin|g: 7bit.|
|00000230| 0a 52 6f 62 65 72 74 20 | 42 61 72 63 6c 61 79 20 |.Robert |Barclay |
|00000240| 53 74 65 76 65 6e 73 6f | 6e 20 77 72 6f 74 65 3a |Stevenso|n wrote:|
|00000250| 0a 3e 20 69 6e 74 20 2a | 2a 61 72 72 61 79 5f 3b |.> int *|*array_;|
|00000260| 20 20 2f 2f 69 73 20 74 | 68 69 73 20 74 68 65 20 | //is t|his the |
|00000270| 73 61 6d 65 20 61 73 20 | 61 72 72 61 79 5f 5b 5d |same as |array_[]|
|00000280| 20 3f 0a 3e 20 0a 3e 20 | 41 6e 64 20 74 68 65 6e | ?.> .> |And then|
|00000290| 20 75 73 65 20 73 6f 6d | 65 74 68 69 6e 67 20 6c | use som|ething l|
|000002a0| 69 6b 65 3a 0a 3e 20 0a | 3e 20 61 72 72 61 79 5b |ike:.> .|> array[|
|000002b0| 64 65 70 74 68 5d 20 3d | 20 6e 65 77 20 69 6e 74 |depth] =| new int|
|000002c0| 5b 77 69 64 74 68 5d 3b | 0a 3e 20 0a 0a 61 72 72 |[width];|.> ..arr|
|000002d0| 61 79 5f 20 69 73 20 61 | 20 70 6f 69 6e 74 65 72 |ay_ is a| pointer|
|000002e0| 20 74 6f 20 61 20 70 6f | 69 6e 74 65 72 2e 0a 0a | to a po|inter...|
|000002f0| 62 79 20 64 6f 69 6e 67 | 20 61 72 72 61 79 5f 5b |by doing| array_[|
|00000300| 64 65 70 74 68 5d 20 79 | 6f 75 20 61 72 65 20 74 |depth] y|ou are t|
|00000310| 72 79 69 6e 67 20 74 6f | 20 64 65 72 65 66 65 72 |rying to| derefer|
|00000320| 65 6e 63 65 20 74 68 65 | 20 66 69 72 73 74 20 70 |ence the| first p|
|00000330| 6f 69 6e 74 65 72 20 74 | 6f 20 67 65 74 20 74 6f |ointer t|o get to|
|00000340| 20 74 68 65 20 73 65 63 | 6f 6e 64 2e 0a 73 69 6e | the sec|ond..sin|
|00000350| 63 65 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 73 |ce there| is no s|
|00000360| 65 63 6f 6e 64 20 70 6f | 69 6e 74 65 72 20 79 6f |econd po|inter yo|
|00000370| 75 20 6e 65 65 64 20 74 | 6f 20 61 6c 6c 6f 63 61 |u need t|o alloca|
|00000380| 74 65 20 6f 6e 65 2e 0a | 0a 69 65 3a 0a 69 6e 74 |te one..|.ie:.int|
|00000390| 2a 20 61 72 72 61 79 5f | 5b 31 30 5d 3b 20 20 2f |* array_|[10]; /|
|000003a0| 2f 20 6e 6f 77 20 77 65 | 20 68 61 76 65 20 61 6e |/ now we| have an|
|000003b0| 20 61 72 72 61 79 20 6f | 66 20 31 30 20 70 6f 69 | array o|f 10 poi|
|000003c0| 6e 74 65 72 73 0a 61 6e | 64 20 6e 6f 77 20 28 2a |nters.an|d now (*|
|000003d0| 61 72 72 61 79 5f 29 20 | 63 61 6e 20 64 65 72 65 |array_) |can dere|
|000003e0| 66 65 72 65 6e 63 65 20 | 61 20 70 6f 69 6e 74 65 |ference |a pointe|
|000003f0| 72 20 61 6e 64 20 67 65 | 74 20 74 6f 20 74 68 65 |r and ge|t to the|
|00000400| 20 6e 65 78 74 20 70 6f | 69 6e 74 65 72 2e 2e 2e | next po|inter...|
|00000410| 0a 0a 6e 6f 77 20 79 6f | 75 20 63 61 6e 3a 0a 61 |..now yo|u can:.a|
|00000420| 72 72 61 79 5b 64 65 70 | 74 68 5d 20 3d 20 6e 65 |rray[dep|th] = ne|
|00000430| 77 20 69 6e 74 5b 77 69 | 64 74 68 5d 3b 0a 0a 79 |w int[wi|dth];..y|
|00000440| 6f 75 20 63 6f 75 6c 64 | 20 61 6c 73 6f 20 64 79 |ou could| also dy|
|00000450| 6e 61 6d 69 63 6c 79 20 | 61 6c 6c 6f 63 61 74 65 |namicly |allocate|
|00000460| 20 74 68 65 20 61 72 72 | 61 79 20 6f 66 20 70 6f | the arr|ay of po|
|00000470| 69 6e 74 65 72 73 3a 0a | 69 6e 74 2a 2a 20 61 72 |inters:.|int** ar|
|00000480| 72 61 79 5f 20 3d 20 6e | 65 77 20 69 6e 74 2a 5b |ray_ = n|ew int*[|
|00000490| 31 30 5d 3b 20 2f 2f 20 | 61 73 20 49 20 62 65 6c |10]; // |as I bel|
|000004a0| 65 69 76 65 20 77 61 73 | 20 73 74 61 74 65 64 20 |eive was| stated |
|000004b0| 62 75 74 20 6e 6f 74 20 | 65 78 70 6c 61 69 6e 65 |but not |explaine|
|000004c0| 64 20 3a 29 0a 0a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |d :)..--|--------|
|000004d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000500| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 20 22 36 34 |--------|---. "64|
|00000510| 30 4b 20 6f 75 67 68 74 | 20 74 6f 20 62 65 20 65 |0K ought| to be e|
|00000520| 6e 6f 75 67 68 20 66 6f | 72 20 61 6e 79 62 6f 64 |nough fo|r anybod|
|00000530| 79 2e 22 0a 20 20 20 20 | 20 20 2d 2d 20 42 69 6c |y.". | -- Bil|
|00000540| 6c 20 47 61 74 65 73 2c | 20 31 39 38 31 0a |l Gates,| 1981. |
+--------+-------------------------+-------------------------+--------+--------+